package com.demo.springBoot2.entity.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @Author pl711@qq.com
 * @PackageName springBoot2
 * @Package com.demo.springBoot2.entity.vo
 * @Date 2024/3/16 23:06
 * @Version 1.0
 */
@Data
public class UsersInfoLoginVO {
    @NotBlank(message = "参数不能留白，不能只有空格、Tab、换行符组成")
    @NotNull(message = "用户名不能为空")
    @ApiModelProperty(value = "用户名",required = true)
    private String username;

    @NotNull(message = "密码不能为空")
    @Length(min = 6,max =11,message = "密码不能小于6位大于11位")
    @Pattern(regexp = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).+$",message = "密码必须包含字母大小写和数字")
    @ApiModelProperty(value = "密码",required = true)
    private String password;
}
